package com.bw.module_car.adpter

import android.content.Intent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat.startActivity
import androidx.recyclerview.widget.RecyclerView
import com.bw.module_car.R
import com.bw.module_car.entity.CarEntity
import com.bw.module_car.view.CarActivity
import com.bw.module_car.view.EditorCarActivity
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class CarAdapter : BaseQuickAdapter<CarEntity,BaseViewHolder>(R.layout.item_car) {


    override fun convert(holder: BaseViewHolder, item: CarEntity) {
        holder.getView<TextView>(R.id.car_number).setText(item.plateNumber)
        holder.getView<TextView>(R.id.car_address).setText("${item.parkingSpaceNumber.substring(0,1)}区${item.parkingSpaceNumber.subSequence(1,3)}号")

    }


}